//Original:/proj/frio/dv/testcases/core/c_dsp32alu_rrppmm_sft/c_dsp32alu_rrppmm_sft.dsp
// Spec Reference: dsp32alu (dreg, dreg) = +/+, -/- (dreg, dreg) >>, <<
# mach: bfin

.include "testutils.inc"
	start

	R0 = 0;
	ASTAT = R0;

	imm32 r0, 0x95679911;
	imm32 r1, 0x2789ab1d;
	imm32 r2, 0x34945515;
	imm32 r3, 0x46967717;
	imm32 r4, 0x5597891b;
	imm32 r5, 0x6989ab1d;
	imm32 r6, 0x94445515;
	imm32 r7, 0x96667777;
	R0 = R0 +|+ R0, R7 = R0 -|- R0 (ASR);
	R1 = R0 +|+ R1, R6 = R0 -|- R1 (ASL);
	R2 = R0 +|+ R2, R5 = R0 -|- R2 (ASR);
	R3 = R0 +|+ R3, R4 = R0 -|- R3 (ASR);
	R4 = R0 +|+ R4, R3 = R0 -|- R4 (ASL);
	R5 = R0 +|+ R5, R2 = R0 -|- R5 (ASR);
	R6 = R0 +|+ R6, R1 = R0 -|- R6 (ASL);
	R7 = R0 +|+ R7, R0 = R0 -|- R7 (ASR);
	CHECKREG r0, 0xcAB3cC88;
	CHECKREG r1, 0x73567A52;
	CHECKREG r2, 0xf27FfB89;
	CHECKREG r3, 0xdBFE1028;
	CHECKREG r4, 0x799E541C;
	CHECKREG r5, 0xa2E89D87;
	CHECKREG r6, 0xE246e9F2;
	CHECKREG r7, 0xcAB3cC88;

	imm32 r0, 0x11678911;
	imm32 r1, 0xa719ab1d;
	imm32 r2, 0x3a415515;
	imm32 r3, 0x46a67717;
	imm32 r4, 0x556a891b;
	imm32 r5, 0x6789ab1d;
	imm32 r6, 0x74445a15;
	imm32 r7, 0x866677a7;
	R0 = R1 +|+ R0, R7 = R1 -|- R0 (ASR);
	R1 = R1 +|+ R1, R6 = R1 -|- R1 (ASR);
	R2 = R1 +|+ R2, R5 = R1 -|- R2 (ASL);
	R3 = R1 +|+ R3, R4 = R1 -|- R3 (ASR);
	R4 = R1 +|+ R4, R3 = R1 -|- R4 (ASR);
	R5 = R1 +|+ R5, R2 = R1 -|- R5 (ASR);
	R6 = R1 +|+ R6, R1 = R1 -|- R6 (ASL);
	R7 = R1 +|+ R7, R0 = R1 -|- R7 (ASR);
	CHECKREG r0, 0x41AC229A;
	CHECKREG r1, 0x4E32563A;
	CHECKREG r2, 0xe6B4fF86;
	CHECKREG r3, 0xfB70088D;
	CHECKREG r4, 0xaBA9a290;
	CHECKREG r5, 0xc064aB96;
	CHECKREG r6, 0x4E32563A;
	CHECKREG r7, 0x0C8533A0;

	imm32 r0, 0xb567891b;
	imm32 r1, 0x2b89abbd;
	imm32 r2, 0x34b45b15;
	imm32 r3, 0x466bb717;
	imm32 r4, 0x556bb91b;
	imm32 r5, 0x67b9ab1d;
	imm32 r6, 0x7b4455b5;
	imm32 r7, 0xb666777b;
	R0 = R2 +|+ R0, R7 = R2 -|- R0 (ASR);
	R1 = R2 +|+ R1, R6 = R2 -|- R1 (ASR);
	R2 = R2 +|+ R2, R5 = R2 -|- R2 (ASR);
	R3 = R2 +|+ R3, R4 = R2 -|- R3 (ASL);
	R4 = R2 +|+ R4, R3 = R2 -|- R4 (ASR);
	R5 = R2 +|+ R5, R2 = R2 -|- R5 (ASR);
	R6 = R2 +|+ R6, R1 = R2 -|- R6 (ASL);
	R7 = R2 +|+ R7, R0 = R2 -|- R7 (ASR);
	CHECKREG r0, 0xED5Ae246;
	CHECKREG r1, 0x2B8AaBBC;
	CHECKREG r2, 0x1A5A2D8A;
	CHECKREG r3, 0x2C11098C;
	CHECKREG r4, 0x08A35188;
	CHECKREG r5, 0x1A5A2D8A;
	CHECKREG r6, 0x3DDE0A6C;
	CHECKREG r7, 0x2D004B43;

	imm32 r0, 0xbc678c11;
	imm32 r1, 0x27c9cb1d;
	imm32 r2, 0x344c5515;
	imm32 r3, 0x46c6c717;
	imm32 r4, 0x55678c1b;
	imm32 r5, 0x6c89abcd;
	imm32 r6, 0x7444551c;
	imm32 r7, 0x8c667777;
	R0 = R3 +|+ R0, R7 = R3 -|- R0 (ASL);
	R1 = R3 +|+ R1, R6 = R3 -|- R1 (ASR);
	R2 = R3 +|+ R2, R5 = R3 -|- R2 (ASR);
	R3 = R3 +|+ R3, R4 = R3 -|- R3 (ASR);
	R4 = R3 +|+ R4, R3 = R3 -|- R4 (ASL);
	R5 = R3 +|+ R5, R2 = R3 -|- R5 (ASR);
	R6 = R3 +|+ R6, R1 = R3 -|- R6 (ASR);
	R7 = R3 +|+ R7, R0 = R3 -|- R7 (ASL);
	CHECKREG r0, 0xF19C3044;
	CHECKREG r1, 0xbF07C818;
	CHECKREG r2, 0xC227eA96;
	CHECKREG r3, 0x8D8C8E2E;
	CHECKREG r4, 0x8D8C8E2E;
	CHECKREG r5, 0xCB64a397;
	CHECKREG r6, 0xCE85C615;
	CHECKREG r7, 0x44940874;

	imm32 r0, 0xd56789d1;
	imm32 r1, 0x2d89abdd;
	imm32 r2, 0x34d455d5;
	imm32 r3, 0x4d667717;
	imm32 r4, 0x5dd7891b;
	imm32 r5, 0x6789ab1d;
	imm32 r6, 0xd44d5515;
	imm32 r7, 0xd666d777;
	R0 = R4 +|+ R0, R7 = R4 -|- R0 (ASR);
	R1 = R4 +|+ R1, R6 = R4 -|- R1 (ASR);
	R2 = R4 +|+ R2, R5 = R4 -|- R2 (ASR);
	R3 = R4 +|+ R3, R4 = R4 -|- R3 (ASL);
	R4 = R4 +|+ R4, R3 = R4 -|- R4 (ASR);
	R5 = R4 +|+ R5, R2 = R4 -|- R5 (ASL);
	R6 = R4 +|+ R6, R1 = R4 -|- R6 (ASR);
	R7 = R4 +|+ R7, R0 = R4 -|- R7 (ASR);
	CHECKREG r0, 0xeE551231;
	CHECKREG r1, 0x045D1AB4;
	CHECKREG r2, 0x18C214CA;
	CHECKREG r3, 0x00000000;
	CHECKREG r4, 0x20E22408;
	CHECKREG r5, 0x6AC67B56;
	CHECKREG r6, 0x1C840953;
	CHECKREG r7, 0x328D11D6;

	imm32 r0, 0xc567a911;
	imm32 r1, 0x278aab1d;
	imm32 r2, 0x3c445515;
	imm32 r3, 0x46a67717;
	imm32 r4, 0x55c7891b;
	imm32 r5, 0x6a8cab1d;
	imm32 r6, 0x7444c515;
	imm32 r7, 0xa6667c77;
	R0 = R5 +|+ R0, R7 = R5 -|- R0 (ASR);
	R1 = R5 +|+ R1, R6 = R5 -|- R1 (ASL);
	R2 = R5 +|+ R2, R5 = R5 -|- R2 (ASR);
	R3 = R5 +|+ R3, R4 = R5 -|- R3 (ASR);
	R4 = R5 +|+ R4, R3 = R5 -|- R4 (ASR);
	R5 = R5 +|+ R5, R2 = R5 -|- R5 (ASL);
	R6 = R5 +|+ R6, R1 = R5 -|- R6 (ASR);
	R7 = R5 +|+ R7, R0 = R5 -|- R7 (ASR);
	CHECKREG r0, 0x04FFD585;
	CHECKREG r1, 0x6B46D608;
	CHECKREG r2, 0x00000000;
	CHECKREG r3, 0x17720887;
	CHECKREG r4, 0xFFB1a27D;
	CHECKREG r5, 0x5C90AC10;
	CHECKREG r6, 0xF14AD608;
	CHECKREG r7, 0x5791D68B;

	imm32 r0, 0xd5678911;
	imm32 r1, 0x2ddddd1d;
	imm32 r2, 0x34ddd515;
	imm32 r3, 0x46d67717;
	imm32 r4, 0x5d6d891b;
	imm32 r5, 0x6789db1d;
	imm32 r6, 0x74445d15;
	imm32 r7, 0xd66677d7;
	R0 = R6 +|+ R0, R7 = R6 -|- R0 (ASR);
	R1 = R6 +|+ R1, R6 = R6 -|- R1 (ASR);
	R2 = R6 +|+ R2, R5 = R6 -|- R2 (ASR);
	R3 = R6 +|+ R3, R4 = R6 -|- R3 (ASL);
	R4 = R6 +|+ R4, R3 = R6 -|- R4 (ASR);
	R5 = R6 +|+ R5, R2 = R6 -|- R5 (ASR);
	R6 = R6 +|+ R6, R1 = R6 -|- R6 (ASL);
	R7 = R6 +|+ R7, R0 = R6 -|- R7 (ASR);
	CHECKREG r0, 0x9EAFcAF7;
	CHECKREG r1, 0x00000000;
	CHECKREG r2, 0x16040544;
	CHECKREG r3, 0x353C5719;
	CHECKREG r4, 0xEDF6E8E3;
	CHECKREG r5, 0x0D2F3AB7;
	CHECKREG r6, 0x8CCCFFF0;
	CHECKREG r7, 0xeE1D34F9;

	imm32 r0, 0xf567a911;
	imm32 r1, 0x2f8aab1d;
	imm32 r2, 0x34a45515;
	imm32 r3, 0x4a6f7717;
	imm32 r4, 0x5567f91b;
	imm32 r5, 0xa789af1d;
	imm32 r6, 0x74445515;
	imm32 r7, 0x866677f7;
	R0 = R7 +|+ R0, R7 = R7 -|- R0 (ASR);
	R1 = R7 +|+ R1, R6 = R7 -|- R1 (ASL);
	R2 = R7 +|+ R2, R5 = R7 -|- R2 (ASR);
	R3 = R7 +|+ R3, R4 = R7 -|- R3 (ASR);
	R4 = R7 +|+ R4, R3 = R7 -|- R4 (ASL);
	R5 = R7 +|+ R5, R2 = R7 -|- R5 (ASL);
	R6 = R7 +|+ R6, R1 = R7 -|- R6 (ASR);
	R7 = R7 +|+ R7, R0 = R7 -|- R7 (ASL);
	CHECKREG r0, 0x00000000;
	CHECKREG r1, 0xCB4Af763;
	CHECKREG r2, 0xFD24bC88;
	CHECKREG r3, 0x12EEdE8A;
	CHECKREG r4, 0x0F0EbF42;
	CHECKREG r5, 0x24D8e144;
	CHECKREG r6, 0xFD34700F;
	CHECKREG r7, 0x21FC9DCC;

	imm32 r0, 0xe5678911;
	imm32 r1, 0x2e89ab1d;
	imm32 r2, 0x34e45515;
	imm32 r3, 0x46667717;
	imm32 r4, 0x556e891b;
	imm32 r5, 0x6789ab1d;
	imm32 r6, 0x7444e515;
	imm32 r7, 0x86667e77;
	R4 = R2 +|+ R5, R3 = R2 -|- R5 (ASR);
	R0 = R5 +|+ R3, R5 = R5 -|- R3 (ASL);
	R2 = R6 +|+ R2, R0 = R6 -|- R2 (ASL);
	R3 = R4 +|+ R0, R2 = R4 -|- R0 (ASR);
	R7 = R7 +|+ R6, R6 = R7 -|- R6 (ASL);
	R6 = R1 +|+ R7, R1 = R1 -|- R7 (ASL);
	R5 = R0 +|+ R4, R7 = R0 -|- R4 (ASR);
	R1 = R3 +|+ R1, R4 = R3 -|- R1 (ASR);
	CHECKREG r0, 0x7EC02000;
	CHECKREG r1, 0x6C72EC0B;
	CHECKREG r2, 0xe7BBF00C;
	CHECKREG r3, 0x667B100C;
	CHECKREG r4, 0xfA082401;
	CHECKREG r5, 0x667B100C;
	CHECKREG r6, 0x47BAE46A;
	CHECKREG r7, 0x18450FF3;

	imm32 r0, 0xd5678911;
	imm32 r1, 0xff89ab1d;
	imm32 r2, 0x34f45515;
	imm32 r3, 0x46667717;
	imm32 r4, 0x556f891b;
	imm32 r5, 0x6789fb1d;
	imm32 r6, 0x74445f15;
	imm32 r7, 0x866677f7;
	R4 = R3 +|+ R3, R5 = R3 -|- R3 (ASR);
	R1 = R6 +|+ R1, R6 = R6 -|- R1 (ASL);
	R6 = R1 +|+ R4, R4 = R1 -|- R4 (ASL);
	R7 = R4 +|+ R2, R0 = R4 -|- R2 (ASR);
	R2 = R2 +|+ R6, R1 = R2 -|- R6 (ASR);
	R3 = R5 +|+ R5, R7 = R5 -|- R5 (ASL);
	R5 = R7 +|+ R7, R3 = R7 -|- R7 (ASL);
	R0 = R0 +|+ R0, R2 = R0 -|- R0 (ASR);
	CHECKREG r0, 0x06BAF2C2;
	CHECKREG r1, 0xEC7A1F0F;
	CHECKREG r2, 0x00000000;
	CHECKREG r3, 0x00000000;
	CHECKREG r4, 0x42683A9A;
	CHECKREG r5, 0x00000000;
	CHECKREG r6, 0x5C0016F6;
	CHECKREG r7, 0x00000000;

	pass
